package naga.x.net.impl.websocket;

import org.apache.mina.core.filterchain.IoFilter;
import org.apache.mina.filter.codec.ProtocolCodecFilter;

import naga.x.App;
import naga.x.net.ClientSessionService;

public class WebSocketClientSessionService extends ClientSessionService {

	@Override
	protected IoFilter getCodecFilter() {
		return new ProtocolCodecFilter(new WebSocketEncoder(), new WebSocketDecoder());
	}

	@Override
	protected int getPort() {
//		return App.getApp().getConfig().getIntValue(Config.WEBSOCKET_PORT);
		return App.getApp().getConfig().port;
	}

	@Override
	public String getId() {
		return "WEB SOCKET";
	}

}
